Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Apache Spark Interview Questions and Answers

Question: How can you persist an RDD in Apache Spark? Provide an example.
Answer: You can persist an RDD using the persist() or cache() method. It allows you to store the RDD's data in memory or on disk for faster access.

Example:

val cachedRDD = inputRDD.persist(StorageLevel.MEMORY_ONLY)
Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook